The present invention relates to highly efficient coding of analog moving picture signals to digital signals with a small amount of codes for efficient data transfer, storage and displaying. Particularly, this invention relates to motion-compensated coding of moving picture signals with motion vector variable encoding.
Moving picture signals are generally encoded by motion-compensated prediction according to encoding standards such as MPEG standards.
Motion vectors (MV) used for motion-compensated prediction are also encoded by variable-length coding and then multiplexed with codes of predictive error signals. Bit streams of multiplexed codes are transferred to decoders, stored into storage media or displayed on screen.
MV encoding is carried out by taking differences between motion vectors in a block of a moving picture signal and those in an adjacent block, and encoding the differences in horizontal and vertical directions by using variable-length codes. The variable-length codes consists of, for example, Huffman codes according to the frequency (the number of times) of generation of motion vector differences.
MV encoding generally uses one code table for variable-length encoding. The code table is composed of variable-length codes in accordance with MV difference distribution (probability of generation of each MV difference). MV differences have a big difference to each other according to motion of pictures, and MV difference distribution does not match a coding table depending on portions of a picture, thus increasing the amount of codes of motion vectors. Furthermore, the smaller the block of moving picture signal in motion compensation for high accuracy, the more the codes of motion vectors in the total amount of generated codes.